﻿<%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="Static.aspx.cs"
    Inherits="Forum.Web.Admin.Body.Static" %>

<%@ Register Assembly="Public.Control" Namespace="Public.Control" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../styles/dntmanager.css" rel="stylesheet" type="text/css" />
    <link href="../styles/page2.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery/jquery.js" type="text/javascript"></script>
    <style>
        .ckall
        {
            display: block;
            height: 21px;
            padding-top: 9px;
            cursor: pointer;
        }
        #apDiv1
        {
            width: 360px;
            height: 278px;
            border: 2px solid #CCCCCC;
            background-color: #FFFFFF;
            display: inline;
        }
        .tu_title
        {
            text-align: center;
            background-color: #f1f1f1;
            font-weight: bold;
        }
        .tu_content
        {
            height: 255px;
            text-align: center;
            line-height: 255px;
        }
        .tu_content img
        {
            padding: 2px;
            border: 1px solid #CCCCCC;
            margin-top: 6%;
        }
        .index_bk_01
        {
            border: 1px solid #CCCCCC;
            height: 22px;
            line-height: 22px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="ManagerForm">
        <fieldset>
            <legend style="background: url(../images/icons/icon10.jpg) no-repeat 6px 50%;">文章列表</legend>
            <div class="MainDiv">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="40px;">
                            &nbsp; 所属分类:
                            <select id="f_mululist0" runat="server" onchange="showifr(this.value);" style="width: 150px;">
                            </select>
                            <label for="sh_0" style="padding: 0px; margin: 0px;">
                                <input type="checkbox" name="checkbox" runat="server" onclick="showurl();" id="sh_0">待审核的</label>
                            <label for="sh_1" style="padding: 0px; margin: 0px;">
                                <input type="checkbox" name="checkbox" runat="server" onclick="showurl();" id="sh_1">已推荐的</label>
                            <label for="sh_3" style="padding: 0px; margin: 0px;">
                                <input type="checkbox" name="checkbox" runat="server" onclick="showurl();" id="sh_3">有缩略图</label>
                            <label for="sh_2" style="padding: 0px; margin: 0px;">
                                <input type="checkbox" name="checkbox" runat="server" onclick="showurl();" id="sh_2">访问排序</label>
                            <label>
                                从<input name="textfield" type="text" id="text1" runat="server" class="index_bk_01"
                                    style="width: 65px;" title="输入起始日期,如:2008-12-25">到<input name="textfield" type="text"
                                        id="text2" runat="server" class="index_bk_01" style="width: 65px;" title="输入结束日期,如:2008-12-26"></label>
                        </td>
                        <td width="250" style="display: ;">
                            <input name="textfield" type="text" id="textfield" runat="server" class="index_bk_01"
                                style="width: 120px;">
                            <input name="button" type="button" class="index_bk_01" id="button" value="搜  索" onclick="showurl();"
                                style="background-color: White;">&nbsp;<input name="button" type="button" class="index_bk_01"
                                    id="addhtml" value="生  成" style="background-color: White;">
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <script type="text/javascript">
                        function showifr(mid) {
                            showurl();

                            //hbctl_.$("ifr").src="NewsList2.aspx?mid="+mid+"&k="+hbctl_.GetRound();
                        }
                        function showurl() {
                            var mid_ = $("#f_mululist0").val(); //  hbctl_.GetValueOrTextBySelectID("f_mululist0", "value");
                            var tf_sh = $("#sh_0").attr("checked") == true; //  hbctl_.$("sh_0").checked; //审核
                            var tf_jh = $("#sh_1").attr("checked") == true; //  hbctl_.$("sh_1").checked; //推荐
                            var tf_time = $("#sh_2").attr("checked") == true; // hbctl_.$("sh_2").checked; //按访问排行
                            var tf_tu = $("#sh_3").attr("checked") == true; // hbctl_.$("sh_3").checked; //有缩略图的

                            var tf_key = $("#textfield").val(); //hbctl_.$("textfield").value; //推荐
                            var tf_stime = $("#text1").val(); //hbctl_.$("text1").value;
                            var tf_ntime = $("#text2").val(); //hbctl_.$("text2").value;

                            var url = "Static.aspx?mid=" + mid_ + "&k=" + Math.random() + "&tf_sh=" + tf_sh + "&tf_jh=" + tf_jh + "&tf_time=" + tf_time + "&tf_tu=" + tf_tu;
                            if (tf_key.length > 0 && tf_key != " ") {
                                url = url + "&tf_key=" + encodeURI(tf_key);
                            }
                            if (tf_stime.length > 7) {
                                url = url + "&tf_stime=" + tf_stime;
                            }
                            if (tf_ntime.length > 7) {
                                url = url + "&tf_ntime=" + tf_ntime;
                            }

                            window.location = url;
                        }
                    </script>
                </table>
                <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#EAE9E1">
                    <tr bgcolor="#F2F2F2">
                        <td height="2" colspan="10" bgcolor="#CCCCCC">
                        </td>
                    </tr>
                    <tr bgcolor="#F2F2F2">
                        <td width="50" height="35">
                            <strong>生成状态</strong>
                        </td>
                        <td>
                            <strong>&nbsp;文章标题</strong>
                        </td>
                        <td width="35" align="center">
                            <strong>类型</strong>
                        </td>
                        <td width="100" align="center">
                            <strong>录入者</strong>
                        </td>
                        <td width="100" align="center" bgcolor="#F2F2F2">
                            <strong>添加日期</strong>
                        </td>
                        <td width="70" align="center" bgcolor="#F2F2F2">
                            <strong>访问/评论</strong>
                        </td>
                    </tr>
                    <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
                            <tr g='tr'>
                                <td height="30" bgcolor="#FFFFFF" align="center">
                                    √
                                </td>
                                <td bgcolor="#FFFFFF">
                                    &nbsp;<a href="Static.aspx?mid=<%#Eval("Body_MuLuID") %>">[<%#GetMuLuName(Eval("Body_MuLuID"))%>]</a><a
                                        href="ShowNews.aspx?id=<%#Eval("Body_ID") %>"><%#Eval("Body_Name").ToString().Length > 30 ? Eval("Body_Name").ToString().Substring(0, 28) + "..." : Eval("Body_Name")%></a>
                                </td>
                                <td bgcolor="#FFFFFF" align="center">
                                    <img src="../images/jpg_<%#Eval("Body_Lenght")%>.gif" />
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    <%#Eval("Body_AddName")%>
                                </td>
                                <td width="100" align="center" bgcolor="#FFFFFF">
                                    <%#Eval("Body_AddTime","{0:yyyy-M-d HH:mm}")%>
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    <%#Eval("Body_FangWen")%>/<%#Eval("Body_HuiFu")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
                <br />
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30" align="right">
                            <asp:Label ID="Label1" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
        </fieldset>
        <div class="Navbutton" style="display: none;">
            11111111111111111
        </div>
    </div>
    <script type="text/javascript">
    var page=<%=Page %>;
    var pageCount=<%=pagecount %>;
    var isaddhtml=<%=isaddhtml %>;//0表示未开始生成,1表示已经在生成

    function shownewpage()
    {
        if(page<pageCount )
        {
            setTimeout(function(){
            var nurl= $(".page_index").next().attr("href");   
                window.location.href=nurl;
            },1500);
        }
    }
        $(function () {
            $("[g='tr']").hover(function () { $(this).find("td").css("background-color", "#ccc") },
            function () { $(this).find("td").css("background-color", "#fff") });


            $("#addhtml").click(function () {
               var indexurl=window.location.href.toString()+"&isaddhtml=1";
               window.location.href=indexurl;
            });

           if(isaddhtml==1){
                $("#addhtml").hide();
                shownewpage();
            }
        });
    </script>
    </form>
</body>
</html>
